import time

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By


driver = webdriver.Chrome(service=Service('chromedriver.exe'))
driver.maximize_window()
driver.get('https://bahuyun.com/bdp/form/1370889698236956672')
driver.implicitly_wait(10)
# 填写日期
driver.find_element(By.XPATH, '//*[@id="input-YvRQ32wsVyUFlGRoRBio7"]').send_keys('0020220101')
# 评价
driver.find_element(By.XPATH, '//*[@id="my-node"]/div[5]/div/div[2]/div/div[1]/div[2]/div[4]/i').click()
driver.find_element(By.XPATH, '//*[@id="my-node"]/div[5]/div/div[2]/div/div[2]/div[2]/div[5]').click()
# 上传附件，上传图片的路径必须是绝对路径
driver.find_element(By.XPATH, '//*[@id="my-node"]/div[6]/div/div[2]/div/div/div/div/div/input').send_keys('C:\\Users\\Administrator\\Desktop\\报告\\图片\\1.jpg')
time.sleep(20)

